class Decorate < ActiveRecord::Base
  has_many :decorate_documents, :dependent => :destroy
  has_many :documents, :through => :decorate_documents

  def self.javascripts
    self.find :all, :conditions => { :decorate_type => "javascript" }
  end

  def self.stylesheets
    self.find :all, :conditions => { :decorate_type => "stylesheet" }
  end
end
